package com.miracle.java2110.mapper;

import com.miracle.java2110.pojo.Order;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrderMapper {

    List<Order> selectByParams(Map<String, Object> params);

    Order selectOrderById(Integer id);

    void deleteOrders(Integer id);

    Integer selectGuestId(String guestPhone);

    List<Integer> selectRoomId(@Param("roomType")String roomType, @Param("status") String status);

    void updateDrinks(@Param("did") Integer did, @Param("dquantity") Integer dquantity);

    Integer selectServicePrice(Integer id);

    Integer addOrder(Order order);

    void updateRoom(@Param("roomId") Integer roomId, @Param("status") String status);

    void addOrderService(@Param("id") Integer id, @Param("serviceId") Integer serviceId);

    void addOrderdrinks(@Param("id") Integer id, @Param("drinksId") Integer drinksId, @Param("drinkCount") Integer drinkCount);

    void addOrderEmployee(@Param("id") Integer id, @Param("employeeId") Integer employeeId);

    Integer selectOrderId();

    void deleteOrderDrinks(Integer orderId);

    void deleteOrderEmployee(Integer orderId);

    void deleteOrderService(Integer orderId);

    Integer selectRoomPrice(Integer roomId);

    void updateOrderRoomId(@Param("id") Integer orderId, @Param("roomId") Integer newRoomId);

    void updateOrderdrinks(@Param("orderId") Integer orderId, @Param("drinksId") int drinksId, @Param("difference") int difference);

    void updateOrderMoney(@Param("id") Integer orderId, @Param("orderMoney") Integer orderMoney);

    void deleteOrderDrinksByDrinkId(@Param("orderId") Integer orderId, @Param("drinksId") int drinksId);
}